<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<!-- <script type="text/javascript">
			var inputObj = document.getElementById('inputId');
			function clickMe() {
				console.log('clickMe');
				console.log(inputObj.id);
				console.log(inputObj.value);
			}
		</script> -->
	</head>
	<body>
		<input type="text" id="inputId" value="Hello"/><br/>
		<input type="button" value="点我" onclick="clickMe()"/>
		<button onclick="clickMe()">点我</button>
		
		<script type="text/javascript">
			//var inputObj = document.getElementById('inputId');
			function clickMe() {
				console.log('clickMe');
				var inputObj = document.getElementById('inputId');
				console.log(inputObj.id);
				console.log(inputObj.value);
			}
		</script>
	</body>
</html>